//后台路由
module.exports = app =>{
    const {router,controller} = app
    const adminAuth = app.middleware.adminAuth()
    const accessControlMaxAge = app.middleware.accessControlMaxAge()
    router.post('/admin/login',controller.admin.index.checkLoginController)
    router.get('/admin/type',adminAuth,controller.admin.index.getTypeInfoController)
    router.post('/admin/addArticle',adminAuth,accessControlMaxAge,controller.admin.index.addArticleController)
    router.post('/admin/updateArticle',adminAuth,controller.admin.index.updateArticleController)
    router.get('/admin/getArticleList',adminAuth,controller.admin.index.getArticleListController)
    router.get('/admin/delArticle/:id',adminAuth,controller.admin.index.delArticleController)
    router.get('/admin/editArticle/:id',adminAuth,controller.admin.index.editArticleController)
}